added tests and made one parser method private