created a new helper function