add hash first approach