added keyvalidation
moved over to logicNP for key handling