restructure as packages