added test files
implemented key database check for permission