cleaned up many errors - almost there