initial comit
Adjusted the P register to act as a buffer