work as script or library