rename 'args' to 'keys' for understanding
add comments to explain method control flow