Put functions in the lib