updated libraries
updated libraries, adapted code