moved rendering code out of main; all loaded objects are now rendered