change to arguments detection solution