remove unused imports
pass by reference optimisation