test docs
get rid of external functions