added basic viewport height and width checking for use later on