refactoring and update cassandra driver