adding documentation + tests