created method to transfer an amount to another account