fixed bugs, added todos