break partial renderer into separate middleware