optimized onSuccesItem function