first version of the port, seems to work fine!