use conditional not ternary
add count_sentences JS todo