Chris's PTAM functions implemented
updated to the current PTAM functions
updated for new PTAM functions