implemented the activity API