refactored some variables names and removed Log.d calls