main controller done.