t1: Implemented logic of ip checking