Is there a better approach here?