Semi smart PSO, but not done yet

intermediate commit to prevent lagging behind in commits