updating api
complete implementation