move documentation closer to the documented function