You could create a `source` variable to avoid calling `getSource` twice.