made the code pretty