new function added called retrieveAccount