add runtime and updated test code