updated to handle GTM