initialize device