fix problems as suggested by TA