fixing up api
add function