A dirty small note code for Algo 1 class, not of any interest to anybody