methods for generating keys
fix method signatures, ensure matching