added more validation stuff