fixed a bug in updated method that was not parsing where conditions properly