added viewport snippet