better documentation
fixed tests