Made this program actually functional