casting to hash