fixes #172
finishes #166
last one