revised.cleaned up