refactoring the code to support multiple withdrawal methods