Returned function instead of object