wrote io for calculations