First version of solution to Assignment