code organization, improvements