added computeFullPath and clamp methods