add hash extend() method for templating