Fixed outofbounds exception
Added import to check integer
Fixed case sensitivity