revised for the new impl