refactored to work with the new ground