fixes #6 as suggested