implements loop to draw each field on gui and write functions to do it.