finished #81 and fixed compiler error