semi-working rectangule tracking