Moveing code to Control Panel, not working\! not complete\!