making the helper functions