implemented solve
added TODOs