modify the code for general use.