Legislators are expecting a legal challenge over the bills