added validation of title