Trying the PLY implementation, the SPARK is too hard to debug