added a method for parser