fixed some issues pointed out by TA