refactored code and added new test for multiple validators and actions