a more cleaner solution for android 2.3.x