adding version with WHERE
deleted logging by mistake