The is overly complex. Neither of the other functions that use this function make use of the keys.