Added the two functions that Kevin wanted