I'm not sure about this part, maybe I should move this code elsewhere ?