In terms of the structure of the piece, Gogol did adhere to a set of guidelines generally shared with other Petersburg texts. Most prominently, "The Portrait" was grounded in a theme that reflected an underlying social problem, in this case being greed and the desperate pursuit of advancement. In addition, by the end of the story we are able to at least partially sympathize with the main character. Andrey ultimately regretted his decision to make the deal with the portrait and expresses remorse over it. As he reaches the end of his life and his sanity gradually gives way, he begins to destroy artwork without discrimination, and our initial disgust for Andrey over his deal with the painting is at least partially replaced with pity. In this way, Gogol demonstrates that though individuals can be flawed, redemption is still possible, albeit in a manner that the reader may not have been expecting. Other Petersburg texts, such "The Diary of a Madman" and "Notes from Underground", followed similar patterns.