updating bit logic