Used for leetcode