support for variable key length