tomd: change to use longs instead of ints -- fixes #11