changed types to be platform/compiler independent