cleaned up and attemt finxing errors