First go at this assignment - works well