added a much better and obvious :D implementation of p14