added all p3 required functionality and styling