redocument behaviour as defined by @boegel and fix code