refactoring - added methods: with_parser and define_accessors