move success callback into separate methos in view