added resolution independent solution