added API level 2.2 functionality