Why do you use cascades here and below? Single periods would be equivalent, and prevent any issues in the future if someone were to modify this code (adding another `..then` would not be the same as adding another `.then`).