added tests and process arguments handling