small modification of lib