Doc updated and tests added