added part of the main program