modify to use block instead of lambda

to return value from callback
modify version
Merge branch 'work'