added more logic to marking as complete in schedule view