refactor + examples + documentation