fixed a bug with function ex8 and paramaters in main