implemented the subtstract handling