bug fixed, needs some nice bells and whistles though