Added base controller logic