more validation, but its buggy will look at it later