added check for integer type in 3