added helper function to header