fixed exceptions. Added base controller