updated so helper function is not broken