onSuccess as variable