add PSO code, not working very well