fixed bug, added some todos