fixes #4 some tweaks