refactoring + re-organisation