better docs and working tests