A theory for time correlation functions in liquids