fixed loose ends