better implementation and started proper HashMap save