fix a small bug
merge addInstantFunc and addContinuousFunc into addFunc