updated "display viewport" function