switch to window api with new panel api