refactored code and fixed a ton of errors - video 33-34