added a render class
adapted all to new render