add go and preview function