added required args to function checking