moved the adapter class from the MainActivity to a seperate class