helper methods and specs