added register checks