fix 32/64 bit bugs
add atomic data type