write detailed documentation