better resolution detection