cleaned up implementation a bit, added TODOs for future