merged in version of lesson logic done by Franzi and Mike and accordion logic of Lars