this applies to the 3 functions below