use pipe operators instead of nesting function calls