[refactor] create function for parse arguments and remove unused argument for tests