added method chaining functionality