moved render code Into project