add function to get controlling key