Group code in functions(more readable)