added documentation + optional config