actually use the function i wrote