converted piggybank to metatables