changed == to <=