added isOnTop boolean which indicates if view controller is currently first