move this to something that could be reused?