Meh, kinda have this working...prob needs a rewrite