added main, more functions. Conflicts not done