I splitted code into functions to make it easier to read