some added helper functions