pal works for sentences now
added comments in both, and changed main loop in pal