add TODOs
added test case for a bug and make it pass