Introduced helper function