cast $output to int