added volume type and update exception and made
pep8 compliant