updated to work with 64 bit