revised some TODOs, added spectrum plot