implemented basic api integration code + testing