Added a isIPInNetwork function in helpers 

So we can remove range_check, which is really fragile.