extract arbitrary moments