improving openDeposit method with enum parameter for Deposit types