implement keygen and invkey and create gradingShell