correctly implemented condition