implemented P1
enhanced formatting