Exploiting Z-scan for modelocked laser design