right funtion