replace widgets by directive