using bit vector functions