added arg parsing