mostly the assignment 5 minified