fixed bugs, fully OO now