added keymaster, debugging