currentTime attribute test added and some refactoring