Level Select help needed

Hi all, 

I trying to get a level select screen working.

Ive been following a guide from Newham software  on creating a basic level select menu at:  

http://www.newnams.com/corona-level-selection-tutorial/#comment-298,

and Ive been stuck on how and where I implement my main.lua file into the menu setup. Ive tried adding my code to the play.lua but am sure its not supposed to go there at all. Can anyone assist me in how I make my main.lua file work with the level select. 

Any help would be awesome. 

Many thanks 

Dip