forked version with updated geometry and changes to compile on modern linux centos 6.4 x86