updated libraries
updated libraries, formatted code, added comments