rewrote backbone code