Using Hash to improve performances