updated rendering code to work with networking code