changed allKeys func