trying anonymous function as success callback