Removed unnecessary helper function