cleaning and better validation placement