wrapped outer function in main function
updated mini file