calculate execution time + bugfixes