Trying to refactor a bit and a bit  more