Updated for android-studio compatibility