added semantic.gs with optimizations