added helper function
added helper function