what causes painful menses and its solution?