minor fix, generalization