add priority, fixes #29