initializing controller