single file compile, add tests