made small changes, adapted for PlayBook
changes.