example of using bind to attach 'this' to its correct object