partially merged #36