Modified how to instatiate preview