added keymaster and erros class