modify for chained manipulation in terminal