changes for making it compatible with bb