updated definition of p
updated comments for smaller displays