improve docs & tests