docs and test for models