Use as library