main.c added
some calculating added to main.c