add err check, use strict