added more arg parsing code