rebuild controller (delete main)