combine the two functions so there arent double calls