wrap panel functionality