Use more chaining to simplify code