added basic api funcitonality