changed update query so it works correctly as it is supposed to.