fixed timestamp call and added test case