[#67] refactored generate_identifier method to ensure uniqueness