What methods are used to detect planets around distant stars?