We present a detailed description of a fundamental group algorithm based on Formans combinatorial version of Morse theory. We use this algorithm in a classification problem of prime knots up to 14 crossings.