moved rendering pipeline into script