fixed bugs, added some new stuff