corrected typos and added missing arguments