adapt documentation
avoid one if statement most of the time