define valid params in a different method, easier to extend