fixed loose ends from comments branch