add documentation and sanity check