added sg integration
integrated with sg
fixed merge conflicts