added a helper method