pack the code to make tidy