note: replaced Object(keys).forEach with for( keys in ...)