improved arguments parsing