updated code in lib