rename some files, and dividing responsability of function validate