updated to work out of the box with doctrine's adapter