prepare hash