Example usage + refactor