Improved timecomplexity functionality