fixed bugs, working now