add hash to improve the performance