Course of intellectual functioning in schizophrenia and bipolar disorder: a 10-year follow-up study