refactored all int types to stdint types