solve interval and save output