organized code into Panel and Decorate