Isn't there an easier way to do this without having to set up a databas