better docs and catch edge case