refactoring, optimisation, change styling