rendering function finished