added socket callback