added exception for missing outcome index