template with inputs, and random key generator