continues the port, add tests