Work divided in functions