functions for defining keys