libraries fix + db method