Copy of work based on Roland's code.