I decided to split the function for both architecture, easier to read now ...