refact bank transfer sample code.