cassandra refactor