UPDATED small refactoring.