translate function update

changed += to -= to allow working with negative values