debugged gaheft_for_pso