adding problem 4 and reverse int function