added viewport scaling