refactor for testing & to remove cluster