part of main function is written