underscore: implemented flatten w/ shallow option