updated widget interface and added tests