setResolution function added