major changes; sgr sim almost finished