formatting and making sense of code