added handler for head tags