another huge method that could be split in smaller with especific functionality