extract common lib