first iteration of functions