Modified for Android Studio