minor update: rewrote an if