basically finish the function of extracting the integer points