changed hash types to avoid cast warnings