Added withdraw function, not tested