basic version and tests