changed painter.env into dict for easier handling