Refactored for update