made keys in list function optional