add method body follow makeVector/cachemean