finished api and user class