fixes #1 and formatting