implemented for all functions