try to change the serial codes to parallel ones, but they are left to test.