First version of programming asssignment 2