added arg parsing and removed latex dependency