added checking of points that belongs to diffenent shapes