refactoring to cassandra go faster