Add comments and renamed function to be more clear of purpose