created insane algorithm for searching stations

will refactor/comment later