updated activityviewcontroller with more advanced features