more precise type for List.keys