My code is horribly inefficient
change refresh code