added code to initialize the viewport and define a square