implements dump() method, fix strict errors