add inMaintenanceMode function