writing and reading from cassandra