add calc withdraw, change tests and add more tests.