added moment struct and update formula