added code to create results