fixes #89

also some formatting