Changed script to work with sse