organized existing code into packages