Watching tv linked to lower functioning in middle age, says