client: code improvement, change returning function data using callback