updated to use ft_selectdata with key-value pairs (ft_Selectdata with cfg currently not working)