Refactored into function use strict form