slighty better use of lodash.extend