making the code pretty and structured