first verion with tests