copying sources corrected and tested