allow classes in any order on p elements

fixes #139
Merge pull request #142 from nlbdev/p-class-ordering

allow classes in any order on p elements