I think we might need to move this function up to address jshint.