updated to handle script tags