fixed main controller working fiarly well now