replace working code from backup repo
Found more spelling errors