valid_key helper
create_key helper