dual functions for basic & err handling