added helper functions for paul