new parse algo, needs work