inCell function added

need improvement