move draw code to class Render