fixed tests and introduced range wrapper for getting text