add some codes for target devices