more efficient calculations to fit screen