add main function and change code according that (variables and stuff)