added functionality

prints main function top