add check for NULL and too many charecters