finish missing functions in module lib