cleaned up foundation stuff