refactored account for typeaccount