fixes for unit 3, 4, 5