initial commit of knots code -- needs cleanup