copying OMR code to play around with