added some validation and tests to account