generalize postM