A Uniform Approach To Define Complexity Classes