modified code as per manufacturer's instruction