foramt the code and remove unnecessary spacing