added function for account key validation