num should be first argument