Added Matt's functions

commented out my own, kept them for reference