added to the two functions