sort of cleaned up