Implementing a P-system