callback added for updating hash