operation mode implemented and argument parsing changed to other lib