modify to work with renderer