porting udacity cs253 to golang