Script to run sga