Changed little helper method to make it faster