updated the code for link method(refactored)
Titleixe some keys in hash