added more test cases and added a time counter