more rubyish, added another condition to valid?