removed unnecessary helper function