little refactor to remove duplicated calc of plus|minus period