correction to conditional code