Added planets, updated the algorithm