Makes more sense to move the functions together at the top