final version migrated from personal repository