refactored implementation of +