added North's contributions and adapted them slightly