a copy from jsi, will be modified later.