complete in O(1)