calcHash; hash clearing; value check