putting common functions in lib package