added stash feature and validator class