brought validation to gui