merged the two functions and snazzed up the layout.