changing renderer to an object instead of a constructor