added validator, package data getter, modularized more