properly defining hash