changed hack for terminal periods to be entirely in handle_all