WIP: finalize the implementation, compiles