refactor rocksg