refactor peg
refactor initializer
removed unneeded code