predict is mostly templated
removed a bunch of commented code