fixes #8

remove empty dict, use max
Merge pull request #9 from 17/master

fixes #8