did some refactoring put all functions under Tiem