fork of http://www.phpcodeworks.com/pec