added code for openAccount function