completes(with possible room for improvement) b assignment