works for different screen sizes, based on part of canvas showing