main now only contains function calls and presenting of results. All functions outside main