withdraw function [fix]