added begin and end timer