rebuild controller (add new main)