refactoring; html patters changed fix