out may be null