refactor render separator method