called up functions in main. tested out