I wrote this program for my seminar paper