let's move this to the header so it can be inlined