support for variable key sizes