Create validate.R for distribution.R
Accept query with N