turning example into documentation