changeViewport function has been implemented