added helper functions