added run time analysis