add timestamp in hash function; fix code style