added static lib support