fixed second snippet error