Added a very simple functions involving loops