added a withdraw function with fee