It at least compiles now.
now actually working
minor cleanup