@alexander-schranz  ... please check inline code comment and remove code duplication