code snippets written for codeacademy.com exercises