refactored to make methods chainable