adapted spec to return value