added functionality on the main file