rendering done, added error catching