fixed all bugs and functions in main. left some data and images