I would replace the "then" in the first sentence with a comma.