add option for creating nested keys

Closes #7