working on PN simulator