fix bug where no args are passed; minor cleanup