I'll rework this and repost later