added select case to all main