merge code and add effect