adding external helper functions