temp version... cannot submit to leetcode :(