first steps towards api layer