initialize before device ready