Modified temp_cin and temp_cout from last bug