start of api work