renamed functions dir to lib