pretty prints and makes it a function