added chord generation fixed bug in NIF