Working with first iteration of MAIN