finished hopefully algebra struff