helper methods must be at the top