divide operation into deposit and withdraw