adding asserts in lib2patches
adding input checks to locvotes