for static linking