fixes #170
fixes #170
finally tested as working