added nested key name handling