corrected errors from the code that was written online
corrected errors from the code that was written online
added logic to compute which notes are sharped or flatted for any key