add multi key support

fixes #2287
@johnsimons done