changed returns to references for easier chaining