add hash method to identify entities