removed include ctype as its not necessary