made universal hash function for display objects