diff --git a/build.gradle b/build.gradle
index 7c6b66b..bfc6ca9 100644
--- a/build.gradle
+++ b/build.gradle
@@ -51,7 +51,11 @@ dependencies {
 
     // better version of Java's HttpURLConnection
     compile 'com.squareup.okhttp:okhttp:2.4.0'
+    compile 'com.j256.ormlite:ormlite-android:4.48'
     compile 'com.google.code.gson:gson:2.3.1'
+    compile fileTree(dir: 'libs', include: '*.jar')
+    compile 'com.squareup.retrofit:retrofit:1.9.0'
+    compile 'de.greenrobot:eventbus:2.2.1'
 
     // TODO: requires special build of robolectric right now. working on this...
     testCompile('org.robolectric:robolectric:2.4') {
diff --git a/src/main/AndroidManifest.xml b/src/main/AndroidManifest.xml
index f96e9d3..47056e3 100644
--- a/src/main/AndroidManifest.xml
+++ b/src/main/AndroidManifest.xml
@@ -16,12 +16,6 @@
                 <category android:name="android.intent.category.LAUNCHER" />
             </intent-filter>
         </activity>
-        <activity
-            android:name=".ListViewActivity"
-            android:windowSoftInputMode="adjustPan" />
-        <activity android:name=".NetworkActivity" />
-        <activity android:name=".JSONActivity" />
-        <activity android:name=".NotificationActivity" />
         <activity
             android:name=".PaceCalculatorActivity"
             android:label="@string/title_activity_pace_calculator"
diff --git a/src/main/java/nyc/c4q/Book.java b/src/main/java/nyc/c4q/Book.java
new file mode 100644
index 0000000..f56a489
--- /dev/null
+++ b/src/main/java/nyc/c4q/Book.java
@@ -0,0 +1,372 @@
+package nyc.c4q;
+
+import com.j256.ormlite.field.DatabaseField;
+import com.j256.ormlite.table.DatabaseTable;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Created by Hoshiko on 8/30/15.
+ */
+
+@DatabaseTable(tableName = "books")
+public class Book {
+    @DatabaseField
+    private Integer id;
+
+    @DatabaseField
+    private String title;
+
+    @DatabaseField
+    private String author;
+
+    @DatabaseField
+    private String isbn;
+
+    @DatabaseField
+    private String isbn13;
+
+    @DatabaseField
+    private String publisher;
+
+    @DatabaseField
+    private Integer publishyear;
+
+    @DatabaseField
+    private Boolean checkedout;
+
+    @DatabaseField
+    private Integer checkedoutby;
+
+    @DatabaseField
+    private Integer checkoutdateyear;
+
+    @DatabaseField
+    private Integer checkoutdatemonth;
+
+    @DatabaseField
+    private Integer checkoutdateday;
+
+    @DatabaseField
+    private Integer duedateyear;
+
+    @DatabaseField
+    private Integer duedatemonth;
+
+    @DatabaseField
+    private Integer duedateday;
+
+    private Map<String, Object> additionalProperties = new HashMap<String, Object>();
+
+
+    public Book(Integer id, String title, String author, String isbn, String isbn13, String publisher, Integer publishyear, Boolean checkedout, Integer checkedoutby, Integer checkoutdateyear, Integer checkoutdatemonth, Integer checkoutdateday, Integer duedateyear, Integer duedatemonth, Integer duedateday) {
+        this.id = id;
+        this.title = title;
+        this.author = author;
+        this.isbn = isbn;
+        this.isbn13 = isbn13;
+        this.publisher = publisher;
+        this.publishyear = publishyear;
+        this.checkedout = checkedout;
+        this.checkedoutby = checkedoutby;
+        this.checkoutdateyear = checkoutdateyear;
+        this.checkoutdatemonth = checkoutdatemonth;
+        this.checkoutdateday = checkoutdateday;
+        this.duedateyear = duedateyear;
+        this.duedatemonth = duedatemonth;
+        this.duedateday = duedateday;
+    }
+
+    public Book(Integer id, String title, String author, String isbn, String isbn13, String publisher, Integer publishyear) {
+        this.id = id;
+        this.title = title;
+        this.author = author;
+        this.isbn = isbn;
+        this.isbn13 = isbn13;
+        this.publisher = publisher;
+        this.publishyear = publishyear;
+
+    }
+
+    Book (){}
+    /**
+     *
+     * @return
+     *     The id
+     */
+    public Integer getId() {
+        return id;
+    }
+
+    /**
+     *
+     * @param id
+     *     The id
+     */
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    /**
+     *
+     * @return
+     *     The title
+     */
+    public String getTitle() {
+        return title;
+    }
+
+    /**
+     *
+     * @param title
+     *     The title
+     */
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    /**
+     *
+     * @return
+     *     The author
+     */
+    public String getAuthor() {
+        return author;
+    }
+
+    /**
+     *
+     * @param author
+     *     The author
+     */
+    public void setAuthor(String author) {
+        this.author = author;
+    }
+
+    /**
+     *
+     * @return
+     *     The isbn
+     */
+    public String getIsbn() {
+        return isbn;
+    }
+
+    /**
+     *
+     * @param isbn
+     *     The isbn
+     */
+    public void setIsbn(String isbn) {
+        this.isbn = isbn;
+    }
+
+    /**
+     *
+     * @return
+     *     The isbn13
+     */
+    public String getIsbn13() {
+        return isbn13;
+    }
+
+    /**
+     *
+     * @param isbn13
+     *     The isbn13
+     */
+    public void setIsbn13(String isbn13) {
+        this.isbn13 = isbn13;
+    }
+
+    /**
+     *
+     * @return
+     *     The publisher
+     */
+    public String getPublisher() {
+        return publisher;
+    }
+
+    /**
+     *
+     * @param publisher
+     *     The publisher
+     */
+    public void setPublisher(String publisher) {
+        this.publisher = publisher;
+    }
+
+    /**
+     *
+     * @return
+     *     The publishyear
+     */
+    public Integer getPublishyear() {
+        return publishyear;
+    }
+
+    /**
+     *
+     * @param publishyear
+     *     The publishyear
+     */
+    public void setPublishyear(Integer publishyear) {
+        this.publishyear = publishyear;
+    }
+
+    /**
+     *
+     * @return
+     *     The checkedout
+     */
+    public Boolean getCheckedout() {
+        return checkedout;
+    }
+
+    /**
+     *
+     * @param checkedout
+     *     The checkedout
+     */
+    public void setCheckedout(Boolean checkedout) {
+        this.checkedout = checkedout;
+    }
+
+    /**
+     *
+     * @return
+     *     The checkedoutby
+     */
+    public Integer getCheckedoutby() {
+        return checkedoutby;
+    }
+
+    /**
+     *
+     * @param checkedoutby
+     *     The checkedoutby
+     */
+    public void setCheckedoutby(Integer checkedoutby) {
+        this.checkedoutby = checkedoutby;
+    }
+
+    /**
+     *
+     * @return
+     *     The checkoutdateyear
+     */
+    public Integer getCheckoutdateyear() {
+        return checkoutdateyear;
+    }
+
+    /**
+     *
+     * @param checkoutdateyear
+     *     The checkoutdateyear
+     */
+    public void setCheckoutdateyear(Integer checkoutdateyear) {
+        this.checkoutdateyear = checkoutdateyear;
+    }
+
+    /**
+     *
+     * @return
+     *     The checkoutdatemonth
+     */
+    public Integer getCheckoutdatemonth() {
+        return checkoutdatemonth;
+    }
+
+    /**
+     *
+     * @param checkoutdatemonth
+     *     The checkoutdatemonth
+     */
+    public void setCheckoutdatemonth(Integer checkoutdatemonth) {
+        this.checkoutdatemonth = checkoutdatemonth;
+    }
+
+    /**
+     *
+     * @return
+     *     The checkoutdateday
+     */
+    public Integer getCheckoutdateday() {
+        return checkoutdateday;
+    }
+
+    /**
+     *
+     * @param checkoutdateday
+     *     The checkoutdateday
+     */
+    public void setCheckoutdateday(Integer checkoutdateday) {
+        this.checkoutdateday = checkoutdateday;
+    }
+
+    /**
+     *
+     * @return
+     *     The duedateyear
+     */
+    public Integer getDuedateyear() {
+        return duedateyear;
+    }
+
+    /**
+     *
+     * @param duedateyear
+     *     The duedateyear
+     */
+    public void setDuedateyear(Integer duedateyear) {
+        this.duedateyear = duedateyear;
+    }
+
+    /**
+     *
+     * @return
+     *     The duedatemonth
+     */
+    public Integer getDuedatemonth() {
+        return duedatemonth;
+    }
+
+    /**
+     *
+     * @param duedatemonth
+     *     The duedatemonth
+     */
+    public void setDuedatemonth(Integer duedatemonth) {
+        this.duedatemonth = duedatemonth;
+    }
+
+    /**
+     *
+     * @return
+     *     The duedateday
+     */
+    public Integer getDuedateday() {
+        return duedateday;
+    }
+
+    /**
+     *
+     * @param duedateday
+     *     The duedateday
+     */
+    public void setDuedateday(Integer duedateday) {
+        this.duedateday = duedateday;
+    }
+
+    public Map<String, Object> getAdditionalProperties() {
+        return this.additionalProperties;
+    }
+
+    public void setAdditionalProperty(String name, Object value) {
+        this.additionalProperties.put(name, value);
+    }
+
+
+}
diff --git a/src/main/java/nyc/c4q/FirstNameComparator.java b/src/main/java/nyc/c4q/FirstNameComparator.java
new file mode 100644
index 0000000..a6302ed
--- /dev/null
+++ b/src/main/java/nyc/c4q/FirstNameComparator.java
@@ -0,0 +1,18 @@
+package nyc.c4q;
+
+import java.util.Comparator;
+
+/**
+ * Created by alvin2 on 9/26/15.
+ */
+public class FirstNameComparator implements Comparator<Person> {
+
+    @Override
+    public int compare(Person person, Person person2) {
+        if (person.firstName.equals(person2.firstName)) {
+            return person.lastName.compareTo(person2.lastName);
+        }
+
+        return person.firstName.compareTo(person2.firstName);
+    }
+}
diff --git a/src/main/java/nyc/c4q/Fragment_pace_calc.java b/src/main/java/nyc/c4q/Fragment_pace_calc.java
new file mode 100644
index 0000000..4666de7
--- /dev/null
+++ b/src/main/java/nyc/c4q/Fragment_pace_calc.java
@@ -0,0 +1,96 @@
+package nyc.c4q;
+
+import android.os.Bundle;
+import android.support.annotation.Nullable;
+import android.support.v4.app.Fragment;
+import android.util.Log;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.Button;
+import android.widget.EditText;
+import android.widget.LinearLayout;
+
+import java.text.NumberFormat;
+import java.text.ParsePosition;
+
+/**
+ * Created by alvin2 on 8/30/15.
+ */
+public class Fragment_pace_calc extends Fragment {
+
+    EditText inputDistance;
+    EditText inputTimeMin;
+    EditText inputTimeSec;
+    EditText inputPaceMin;
+    EditText inputPaceSec;
+    Button buttonCalculate;
+    private double distance = 0;
+    private double time = 0;
+    private double pace = 0;
+
+    @Nullable
+    @Override
+    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
+
+        View root = inflater.inflate(R.layout.fragment_pace_calculator, container, false);
+
+
+        inputDistance = (EditText) root.findViewById(R.id.input_distance);
+        inputTimeMin = (EditText) root.findViewById(R.id.input_time_min);
+        inputTimeSec = (EditText) root.findViewById(R.id.input_time_sec);
+        inputPaceMin = (EditText) root.findViewById(R.id.input_pace_min);
+        inputPaceSec = (EditText) root.findViewById(R.id.input_pace_sec);
+        buttonCalculate = (Button) root.findViewById(R.id.button_calculate);
+
+
+        buttonCalculate.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+
+                if (!inputTimeMin.getText().toString().equals("") && !inputTimeSec.getText().toString().equals("")) {
+                    time = (Double.parseDouble(inputTimeMin.getText().toString()) * 60) + Double.parseDouble(inputTimeSec.getText().toString());
+                }
+
+                if (!inputPaceMin.getText().toString().equals("") && !inputPaceSec.getText().toString().equals("")) {
+                    pace = (Double.parseDouble(inputPaceMin.getText().toString()) * 60) + Double.parseDouble(inputPaceSec.getText().toString());
+                }
+
+                if (isNumeric(inputDistance.getText().toString()) && !inputDistance.getText().toString().equals("")) {
+                        distance = Double.parseDouble(inputDistance.getText().toString());
+                }
+
+
+                if (time == 0 && distance == 0 && pace == 0) {
+
+                } else if (time != 0 && distance != 0 && pace != 0) {
+
+                } else if (time == 0) {
+                    time = (distance * (pace / 60));
+                    inputTimeMin.setText(String.valueOf(time));
+                } else if (distance == 0) {
+                    distance = (time / pace);
+                    inputDistance.setText(String.valueOf(distance));
+                } else if (pace == 0) {
+                    pace = (time / distance);
+                    long num = Math.round(pace) / 60;
+                    inputPaceMin.setText(String.valueOf(num));
+                    double sec = ((pace / 60) - num) * 60;
+                    inputPaceSec.setText(String.valueOf(sec));
+                }
+            }
+        });
+
+        return root;
+    }
+
+    public static boolean isNumeric(String str)
+    {
+        NumberFormat formatter = NumberFormat.getInstance();
+        ParsePosition pos = new ParsePosition(0);
+        formatter.parse(str, pos);
+        return str.length() == pos.getIndex();
+    }
+
+
+}
diff --git a/src/main/java/nyc/c4q/JsonHelper.java b/src/main/java/nyc/c4q/JsonHelper.java
new file mode 100644
index 0000000..36ab811
--- /dev/null
+++ b/src/main/java/nyc/c4q/JsonHelper.java
@@ -0,0 +1,41 @@
+package nyc.c4q;
+
+import android.content.Context;
+
+import com.google.gson.Gson;
+import com.google.gson.reflect.TypeToken;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.util.ArrayList;
+
+/**
+ * Created by Hoshiko on 9/1/15.
+ */
+public class JsonHelper {
+
+    // TODO: This class converts the raw JSON data into java objects (within an ArrayList) to be accessed by LibraryActivity.java
+
+    public static ArrayList<Book> loadBookJsonRawUsingGson(Context context, int jsonResource) {
+
+        InputStream raw = context.getResources().openRawResource(jsonResource);
+        Reader rd = new BufferedReader(new InputStreamReader(raw));
+        Gson gson = new Gson();
+        // TODO: TypeToken forces JSON to convert into an ArrayList of Books instead of just ONE book
+        ArrayList<Book> bookResponse = gson.fromJson(rd, new TypeToken<ArrayList<Book>>() {}.getType());
+        return bookResponse;
+    }
+
+    public static ArrayList<Member> loadMemberJsonRawUsingGson(Context context, int jsonResource) {
+
+        InputStream raw = context.getResources().openRawResource(jsonResource);
+        Reader rd = new BufferedReader(new InputStreamReader(raw));
+        Gson gson = new Gson();
+
+        ArrayList<Member> memberResponse = gson.fromJson(rd, new TypeToken<ArrayList<Member>>() {}.getType());
+
+        return memberResponse;
+    }
+}
diff --git a/src/main/java/nyc/c4q/LastNameComparator.java b/src/main/java/nyc/c4q/LastNameComparator.java
new file mode 100644
index 0000000..d4e6310
--- /dev/null
+++ b/src/main/java/nyc/c4q/LastNameComparator.java
@@ -0,0 +1,16 @@
+package nyc.c4q;
+
+/**
+ * Created by alvin2 on 9/26/15.
+ */
+public class LastNameComparator implements java.util.Comparator<Person> {
+    @Override
+    public int compare(Person person, Person person2) {
+        if (person.lastName.equals(person2.lastName)) {
+            return person.firstName.compareTo(person2.firstName);
+        }
+
+        return person.lastName.compareTo(person2.lastName);
+    }
+}
+
diff --git a/src/main/java/nyc/c4q/LibraryActivity.java b/src/main/java/nyc/c4q/LibraryActivity.java
index ca2a050..c8753c1 100644
--- a/src/main/java/nyc/c4q/LibraryActivity.java
+++ b/src/main/java/nyc/c4q/LibraryActivity.java
@@ -1,21 +1,116 @@
 package nyc.c4q;
 
 import android.app.Activity;
+import android.os.AsyncTask;
 import android.os.Bundle;
 import android.view.View;
 import android.widget.EditText;
+import android.widget.TextView;
+
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
 
 
 public class LibraryActivity extends Activity {
 
+    // TODO:
+    // 1) Member/Book Class
+    // 2) JsonHelper
+    // 3) MYSQLiteOpenHelper
+    // 4) LibraryActivity
+
+
+    // TODO: This class inserts & retrieves the data from the SQLite database
+
     public EditText inputParameter;
+    List <Member> allMembers;
+    List <Book> allBooks;
+    MySQLiteOpenHelper helper;
+    String memberName;
 
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.activity_library);
-
         inputParameter = (EditText) findViewById(R.id.input_parameter);
+
+        helper = MySQLiteOpenHelper.getInstance(getApplicationContext());
+
+        try {
+            allMembers =helper.loadAllMember();
+            allBooks = helper.loadAllBook();
+
+        } catch (SQLException e) {
+            e.printStackTrace();
+        }
+
+        if (allBooks.size() == 0){
+
+            ArrayList<Book> bookList = new ArrayList<>();
+            bookList = JsonHelper.loadBookJsonRawUsingGson(this, R.raw.books);
+            for (int i = 0; i < bookList.size(); i++){
+
+                Book book = bookList.get(i);
+                int id = book.getId();
+                String title = book.getTitle();
+                String author =  book.getAuthor();
+                String isbn = book.getIsbn();
+                String isbn13 =  book.getIsbn13();
+                String publisher = book.getPublisher();
+                int publishyear = book.getPublishyear();
+                Boolean checkedout = book.getCheckedout();
+                if (checkedout != null) {
+                    int checkedoutby = book.getCheckedoutby();
+                    int checkoutdateyear = book.getCheckoutdateyear();
+                    int checkoutdatemonth = book.getCheckoutdatemonth();
+                    int checkoutdateday = book.getCheckoutdateday();
+                    int duedateyear = book.getDuedateyear();
+                    int duedatemonth = book.getDuedatemonth();
+                    int duedateday = book.getDuedateday();
+
+                    helper.insertBookCheckedOutData(id, title, author, isbn, isbn13, publisher, publishyear, checkedout,
+                            checkedoutby, checkoutdateyear, checkoutdatemonth, checkoutdateday, duedateyear, duedatemonth, duedateday);
+                } else{
+                    helper.insertBookData(id, title, author, isbn, isbn13, publisher, publishyear);
+                }
+            }
+        }
+
+        try {
+            allMembers =helper.loadAllMember();
+        } catch (SQLException e) {
+            e.printStackTrace();
+        }
+
+        if (allMembers.size() == 0){
+
+            ArrayList<Member> memberList = new ArrayList<>();
+            memberList = JsonHelper.loadMemberJsonRawUsingGson(this, R.raw.members);
+            for (int i = 0; i < memberList.size(); i++){
+
+                Member member = memberList.get(i);
+                String name = member.getName();
+                int memberId = member.getId();
+                String city = member.getCity();
+                String state = member.getState();
+                int dobDay = member.getDobDay();
+                int dobMonth = member.getDobMonth();
+                int dobYear = member.getDobYear();
+
+
+                helper.insertMemberData(memberId, name, dobMonth, dobDay, dobYear, city, state);
+            }
+        }
+
+    }
+
+    @Override
+    protected void onResume() {
+        super.onResume();
+//        LibraryDataSource dataSource = new LibraryDataSource(this);
     }
 
     public void checkOut(int memberId, int bookId) {
@@ -33,24 +128,200 @@ public boolean checkIn(int memberId, int bookId) {
         return false;
     }
 
-    public void button_getMember_onClick(View view) {
-        String name = inputParameter.getText().toString();
+    public void button_getMember_onClick(View view) throws SQLException {
+        if (inputParameter.equals("")) {
+
+        } else {
+            String name = inputParameter.getText().toString();
+
+            // TODO Display member information for the member with the given name.
 
-        // TODO Display member information for the member with the given name.
+            new MemberDataSeachTask().execute(name);
+        }
     }
 
     public void button_getBook_onClick(View view) {
-        String isbn = inputParameter.getText().toString();
 
-        // TODO Display book information for the book with the given ISBN.
+        if (inputParameter.equals("")) {
+
+        } else {
+            String isbn = inputParameter.getText().toString();
+
+            // TODO Display book information for the book with the given ISBN.
+            new BooksDataSeachTask().execute(isbn);
+        }
     }
 
     public void button_getCheckedOut_onClick(View view) {
-        String name = inputParameter.getText().toString();
+        if (inputParameter.equals("")) {
+
+        } else {
+
+            memberName = inputParameter.getText().toString();
+
+            // TODO Display a list of books that the member with the given name
+            //      currently has checked out, ordered by due date, with the
+            //      earliest due first.
+
+            new BookCheckOutTask().execute(memberName);
+        }
+    }
+
+
+
+    private class MemberDataSeachTask extends AsyncTask<String, Void, Member> {
+        String name;
+        Member member;
+        @Override
+        protected Member doInBackground(String... names) {
+
+
+            try {
+                member = helper.loadMemberData(names[0]);
+            } catch (SQLException e) {
+                e.printStackTrace();
+            }
+            return member;
+        }
+
+        @Override
+        protected void onPostExecute(Member member) {
+            String memberName = member.getName();
+            int memberId = member.getId();
+            String city = member.getCity();
+            String state = member.getState();
+            int dobDay = member.getDobDay();
+            int dobMonth = member.getDobMonth();
+            int dobYear = member.getDobYear();
 
-        // TODO Display a list of books that the member with the given name
-        //      currently has checked out, ordered by due date, with the
-        //      earliest due first.
+            String result = "id: " + String.valueOf(memberId) + "\n" +
+                    "name: " + memberName + "\n" +
+                    "dob: " + String.valueOf(dobMonth) + "/" + String.valueOf(dobDay)+ "/" + String.valueOf(dobYear)+"\n" +
+                    "location: " + city + ", " + state;
+            TextView textView = (TextView)findViewById(R.id.text_display);
+            textView.setText(result);
+        }
     }
 
+
+
+
+    private class BooksDataSeachTask extends AsyncTask<String, Void, Book> {
+        String isbn;
+        Book book;
+        @Override
+        protected Book doInBackground(String... isbns) {
+
+
+            try {
+                book = helper.loadBookData(isbns[0]);
+            } catch (SQLException e) {
+                e.printStackTrace();
+            }
+            return book;
+        }
+
+        @Override
+        protected void onPostExecute(Book book) {
+            int id = book.getId();
+            String title = book.getTitle();
+            String author =  book.getAuthor();
+            String isbn = book.getIsbn();
+            String isbn13 =  book.getIsbn13();
+            String publisher = book.getPublisher();
+            int publishyear = book.getPublishyear();
+
+            String result = "id: " + String.valueOf(id) + "\n" +
+                    "title: " + title + "\n" +
+                    "author: " + author + "\n" +
+                    "isbn: " + isbn + "\n" +
+                    "isbn13: " + isbn13 + "\n" +
+                    "publisher: " + publisher + "\n" +
+                    "publication year: " + String.valueOf(publishyear);
+            TextView textView = (TextView) findViewById(R.id.text_display);
+            textView.setText(result);
+
+        }
+    }
+
+
+    private class BookCheckOutTask extends AsyncTask <String, Void, ArrayList <Book>>{
+        ArrayList<Book> books;
+
+
+
+        @Override
+        protected ArrayList<Book> doInBackground(String... memberNames) {
+            try {
+                books = (ArrayList<Book>) helper.loadCheckedOutBooks(memberNames[0]);
+
+            } catch (SQLException e) {
+                e.printStackTrace();
+            }
+
+            return books;
+        }
+
+        private String getFormattedDueDate(Book book) {
+
+            int dueMonth = Integer.valueOf(String.valueOf(book.getDuedatemonth()));
+            int dueDate = Integer.valueOf(String.valueOf(book.getDuedateday()));
+            int dueYear = Integer.valueOf(String.valueOf(book.getDuedateyear()));
+
+            return String.format("%04d%02d%02d", dueYear, dueMonth,dueDate);
+        }
+
+        @Override
+        protected void onPostExecute(ArrayList<Book> books) {
+            String bookResult = "";
+            Collections.sort(books,new Comparator<Book>(){
+                @Override
+                public int compare(Book lhs, Book rhs) {
+
+                    String lhsDueDate = getFormattedDueDate(lhs);
+                    String rhsDueDate = getFormattedDueDate(rhs);
+
+
+                    return lhsDueDate.compareTo(rhsDueDate);
+
+                }
+
+            });
+
+            for (int i = 0; i<books.size(); i++){
+
+                Book book = books.get(i);
+
+                int id = book.getId();
+                String title = book.getTitle();
+                String author =  book.getAuthor();
+                int checkedoutDateYear = book.getCheckoutdateyear();
+                int checkedoutDateMonth = book.getCheckoutdatemonth();
+                int checkedoutDateDay = book.getCheckoutdateday();
+                int duedateYear = book.getDuedateyear();
+                int duedateMonth = book.getDuedatemonth();
+                int duedateDay = book.getDuedateday();
+
+                String checkeoutDate = String.valueOf(checkedoutDateMonth) + "/" +
+                        String.valueOf(checkedoutDateDay)+ "/" + String.valueOf(checkedoutDateYear);
+
+                String dueDate = String.valueOf(duedateMonth) + "/" +
+                        String.valueOf(duedateDay)+ "/" + String.valueOf(duedateYear);
+
+                bookResult = bookResult +
+                        "\n-----\n" +
+                        "title: " + title + "\n" +
+                        "author: " + author + "\n" +
+                        "checkout date: " + checkeoutDate + "\n" +
+                        "due date: " + dueDate;
+
+            }
+
+
+            String result = "name: " + String.valueOf(memberName)  + bookResult;
+
+            TextView textView = (TextView) findViewById(R.id.text_display);
+            textView.setText(result);
+        }
+    }
 }
diff --git a/src/main/java/nyc/c4q/LibraryDatabaseContract.java b/src/main/java/nyc/c4q/LibraryDatabaseContract.java
new file mode 100644
index 0000000..a23c02a
--- /dev/null
+++ b/src/main/java/nyc/c4q/LibraryDatabaseContract.java
@@ -0,0 +1,44 @@
+package nyc.c4q;
+
+import android.provider.BaseColumns;
+
+/**
+ * Created by alvin2 on 9/27/15.
+ */
+public final class LibraryDatabaseContract {
+
+    public LibraryDatabaseContract() {
+    }
+
+
+    // Members table
+    public static abstract class Members implements BaseColumns {
+        public static final String TABLE_NAME = "members";
+        public static final String COLUMN_NAME_NAME = "name";
+        public static final String COLUMN_NAME_DOB_MONTH = "dob_month";
+        public static final String COLUMN_NAME_DOB_DAY = "dob_day";
+        public static final String COLUMN_NAME_DOB_YEAR = "dob_year";
+        public static final String COLUMN_NAME_CITY = "city";
+        public static final String COLUMN_NAME_STATE = "state";
+    }
+
+    // Books table
+    public static abstract class Books implements BaseColumns {
+        public static final String TABLE_NAME = "books";
+        public static final String COLUMN_NAME_TITLE = "title";
+        public static final String COLUMN_NAME_AUTHOR = "author";
+        public static final String COLUMN_NAME_ISBN = "isbn";
+        public static final String COLUMN_NAME_ISBN13 = "isbn13";
+        public static final String COLUMN_NAME_PUBLISHER = "publisher";
+        public static final String COLUMN_NAME_PUBLISH_YEAR = "publish_year";
+        public static final String COLUMN_NAME_CHECKED_OUT = "checked_out";
+        public static final String COLUMN_NAME_CHECKED_OUT_BY = "co_by";
+        public static final String COLUMN_NAME_CHECKOUT_MONTH = "co_month";
+        public static final String COLUMN_NAME_CHECKOUT_DAY = "co_day";
+        public static final String COLUMN_NAME_CHECKOUT_YEAR = "co_year";
+        public static final String COLUMN_NAME_DUE_MONTH = "due_month";
+        public static final String COLUMN_NAME_DUE_DAY = "due_day";
+        public static final String COLUMN_NAME_DUE_YEAR = "due_year";
+
+    }
+}
diff --git a/src/main/java/nyc/c4q/LibraryDatabaseHelper.java b/src/main/java/nyc/c4q/LibraryDatabaseHelper.java
new file mode 100644
index 0000000..bfcf653
--- /dev/null
+++ b/src/main/java/nyc/c4q/LibraryDatabaseHelper.java
@@ -0,0 +1,395 @@
+package nyc.c4q;
+
+import android.content.ContentValues;
+import android.content.Context;
+import android.content.res.Resources;
+import android.database.Cursor;
+import android.database.DatabaseErrorHandler;
+import android.database.sqlite.SQLiteDatabase;
+import android.database.sqlite.SQLiteOpenHelper;
+import android.util.Log;
+
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.Calendar;
+
+/**
+ * Created by alvin2 on 9/27/15.
+ */
+public class LibraryDatabaseHelper extends SQLiteOpenHelper {
+
+    public static final int DATABASE_VERSION = 1;
+    public static final String DATABASE_NAME = "library.db";
+
+    private static final String SQL_CREATE_TABLE_MEMBERS =
+            "CREATE TABLE " + LibraryDatabaseContract.Members.TABLE_NAME + " (" +
+                    LibraryDatabaseContract.Members._ID + " INTEGER PRIMARY KEY, " +
+                    LibraryDatabaseContract.Members.COLUMN_NAME_NAME      + " TEXT, " +
+                    LibraryDatabaseContract.Members.COLUMN_NAME_DOB_MONTH + " INTEGER, " +
+                    LibraryDatabaseContract.Members.COLUMN_NAME_DOB_DAY   + " INTEGER, " +
+                    LibraryDatabaseContract.Members.COLUMN_NAME_DOB_YEAR  + " INTEGER, " +
+                    LibraryDatabaseContract.Members.COLUMN_NAME_CITY      + " TEXT, " +
+                    LibraryDatabaseContract.Members.COLUMN_NAME_STATE     + " TEXT)";
+
+    private static final String SQL_CREATE_TABLE_BOOKS =
+            "CREATE TABLE " + LibraryDatabaseContract.Books.TABLE_NAME + " (" +
+                    LibraryDatabaseContract.Books._ID + " INTEGER PRIMARY KEY, " +
+                    LibraryDatabaseContract.Books.COLUMN_NAME_TITLE          + " TEXT, " +
+                    LibraryDatabaseContract.Books.COLUMN_NAME_AUTHOR         + " TEXT, " +
+                    LibraryDatabaseContract.Books.COLUMN_NAME_ISBN           + " TEXT, " +
+                    LibraryDatabaseContract.Books.COLUMN_NAME_ISBN13         + " TEXT, " +
+                    LibraryDatabaseContract.Books.COLUMN_NAME_PUBLISHER      + " TEXT, " +
+                    LibraryDatabaseContract.Books.COLUMN_NAME_PUBLISH_YEAR   + " INTEGER, " +
+                    LibraryDatabaseContract.Books.COLUMN_NAME_CHECKED_OUT    + " INTEGER, " +
+                    LibraryDatabaseContract.Books.COLUMN_NAME_CHECKED_OUT_BY + " TEXT, " +
+                    LibraryDatabaseContract.Books.COLUMN_NAME_CHECKOUT_MONTH + " INTEGER, " +
+                    LibraryDatabaseContract.Books.COLUMN_NAME_CHECKOUT_DAY   + " INTEGER, " +
+                    LibraryDatabaseContract.Books.COLUMN_NAME_CHECKOUT_YEAR  + " INTEGER, " +
+                    LibraryDatabaseContract.Books.COLUMN_NAME_DUE_MONTH      + " INTEGER, " +
+                    LibraryDatabaseContract.Books.COLUMN_NAME_DUE_DAY        + " INTEGER, " +
+                    LibraryDatabaseContract.Books.COLUMN_NAME_DUE_YEAR       + " INTEGER)";
+
+    private static final String SQL_DROP_TABLE_MEMBERS =
+            "DROP TABLE IF EXISTS " + LibraryDatabaseContract.Members.TABLE_NAME;
+
+    private static final String SQL_DROP_TABLE_BOOKS =
+            "DROP TABLE IF EXISTS " + LibraryDatabaseContract.Books.TABLE_NAME;
+
+
+    private Resources resources;
+    private String packageName;
+
+    public LibraryDatabaseHelper(Context context, Resources resources, String packageName) {
+        super(context, DATABASE_NAME, null, DATABASE_VERSION);
+        this.resources = resources;
+        this.packageName = packageName;
+    }
+
+    @Override
+    public void onCreate(SQLiteDatabase db) {
+        db.execSQL(SQL_CREATE_TABLE_MEMBERS);
+        db.execSQL(SQL_CREATE_TABLE_BOOKS);
+
+    }
+
+    @Override
+    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
+        db.execSQL(SQL_DROP_TABLE_MEMBERS);
+        db.execSQL(SQL_DROP_TABLE_BOOKS);
+        onCreate(db);
+    }
+
+    public boolean hasData() {
+        SQLiteDatabase db = getReadableDatabase();
+        Cursor cursor = db.rawQuery("SELECT COUNT(*) FROM BOOKS", null);
+        cursor.moveToFirst();
+        int count = cursor.getInt(0);
+        db.close();
+        return count > 0;
+    }
+
+    public void populateData() {
+        SQLiteDatabase db = getWritableDatabase();
+        populateMembersData(db);
+        populateBooksData(db);
+        db.close();
+    }
+
+    private void populateMembersData(SQLiteDatabase db) {
+        JSONArray members = getJsonArray("members");
+        for (int i = 0, length = members.length(); i != length; ++i) {
+            try {
+                JSONObject member = members.getJSONObject(i);
+
+                ContentValues values = new ContentValues();
+                values.put(LibraryDatabaseContract.Members._ID,                   member.getInt("id"));
+                values.put(LibraryDatabaseContract.Members.COLUMN_NAME_NAME,      member.getString("name"));
+                values.put(LibraryDatabaseContract.Members.COLUMN_NAME_DOB_MONTH, member.getInt("dob_month"));
+                values.put(LibraryDatabaseContract.Members.COLUMN_NAME_DOB_DAY,   member.getInt("dob_day"));
+                values.put(LibraryDatabaseContract.Members.COLUMN_NAME_DOB_YEAR,  member.getInt("dob_year"));
+                values.put(LibraryDatabaseContract.Members.COLUMN_NAME_CITY, member.getString("city"));
+                values.put(LibraryDatabaseContract.Members.COLUMN_NAME_STATE,     member.getString("state"));
+
+                db.insert(LibraryDatabaseContract.Members.TABLE_NAME, null, values);
+            }
+            catch (JSONException e) {
+                Log.e("JSON EXCEPTION", e.getMessage());
+                e.printStackTrace();
+            }
+        }
+    }
+
+    private void populateBooksData(SQLiteDatabase db) {
+        JSONArray books = getJsonArray("books");
+        for (int i = 0, length = books.length(); i != length; ++i) {
+            try {
+                JSONObject book = books.getJSONObject(i);
+
+                ContentValues values = new ContentValues();
+                values.put(LibraryDatabaseContract.Books._ID,                      book.getInt("id"));
+                values.put(LibraryDatabaseContract.Books.COLUMN_NAME_TITLE,        book.getString("title"));
+                values.put(LibraryDatabaseContract.Books.COLUMN_NAME_AUTHOR,       book.getString("author"));
+                values.put(LibraryDatabaseContract.Books.COLUMN_NAME_ISBN,         book.getString("isbn"));
+                values.put(LibraryDatabaseContract.Books.COLUMN_NAME_ISBN13,       book.getString("isbn13"));
+                values.put(LibraryDatabaseContract.Books.COLUMN_NAME_PUBLISHER,    book.getString("publisher"));
+                values.put(LibraryDatabaseContract.Books.COLUMN_NAME_PUBLISH_YEAR, book.getInt("publishyear"));
+
+                if (book.has("checkedout") && book.getBoolean("checkedout")) {
+                    values.put(LibraryDatabaseContract.Books.COLUMN_NAME_CHECKED_OUT,    book.getBoolean("checkedout") ? 1 : 0);
+                    values.put(LibraryDatabaseContract.Books.COLUMN_NAME_CHECKED_OUT_BY, book.getInt("checkedoutby"));
+                    values.put(LibraryDatabaseContract.Books.COLUMN_NAME_CHECKOUT_MONTH, book.getInt("checkoutdatemonth"));
+                    values.put(LibraryDatabaseContract.Books.COLUMN_NAME_CHECKOUT_DAY,   book.getInt("checkoutdateday"));
+                    values.put(LibraryDatabaseContract.Books.COLUMN_NAME_CHECKOUT_YEAR,  book.getInt("checkoutdateyear"));
+                    values.put(LibraryDatabaseContract.Books.COLUMN_NAME_DUE_MONTH,      book.getInt("duedatemonth"));
+                    values.put(LibraryDatabaseContract.Books.COLUMN_NAME_DUE_DAY,        book.getInt("duedateday"));
+                    values.put(LibraryDatabaseContract.Books.COLUMN_NAME_DUE_YEAR,       book.getInt("duedateyear"));
+                }
+
+                db.insert(LibraryDatabaseContract.Books.TABLE_NAME, null, values);
+            }
+            catch (JSONException e) {
+                Log.e("JSON EXCEPTION", e.getMessage());
+                e.printStackTrace();
+            }
+        }
+    }
+
+    private JSONArray getJsonArray(String file) {
+        int resId = resources.getIdentifier(file, "raw", packageName);
+        InputStream is = resources.openRawResource(resId);
+        InputStreamReader isr = new InputStreamReader(is);
+        BufferedReader br = new BufferedReader(isr);
+
+        String line;
+        StringBuilder sb = new StringBuilder();
+        try {
+            while ((line = br.readLine()) != null) {
+                sb.append(line);
+            }
+        }
+        catch (IOException e) {
+            Log.e("DATABASE EXCEPTION", e.getMessage());
+            e.printStackTrace();
+        }
+
+        String json = sb.toString();
+        JSONArray jsonArray = null;
+        try {
+            jsonArray = new JSONArray(json);
+        }
+        catch (JSONException e) {
+            Log.e("JSON EXCEPTION", e.getMessage());
+            e.printStackTrace();
+        }
+
+        return jsonArray;
+    }
+
+    public String getMember(String name) {
+        SQLiteDatabase db = getReadableDatabase();
+
+        final String[] projection = {
+                LibraryDatabaseContract.Members._ID,
+                LibraryDatabaseContract.Members.COLUMN_NAME_NAME,
+                LibraryDatabaseContract.Members.COLUMN_NAME_DOB_MONTH,
+                LibraryDatabaseContract.Members.COLUMN_NAME_DOB_DAY,
+                LibraryDatabaseContract.Members.COLUMN_NAME_DOB_YEAR,
+                LibraryDatabaseContract.Members.COLUMN_NAME_CITY,
+                LibraryDatabaseContract.Members.COLUMN_NAME_STATE
+        };
+
+        final String selection = LibraryDatabaseContract.Members.COLUMN_NAME_NAME + "=?";
+
+        final String[] selectionArgs = { name };
+
+        Cursor cursor = db.query(LibraryDatabaseContract.Members.TABLE_NAME,
+                projection,
+                selection,
+                selectionArgs,
+                null,
+                null,
+                null);
+
+        if (cursor.getCount() < 1) { return null; }
+
+        cursor.moveToFirst();
+        String result =
+                "id: " + cursor.getInt(0) + "\n" +
+                        "name: " + cursor.getString(1) + "\n" +
+                        "dob: " + cursor.getInt(2) + "/" + cursor.getInt(3) + "/" + cursor.getInt(4) + "\n" +
+                        "location: " + cursor.getString(5) + ", " + cursor.getString(6);
+
+        db.close();
+        return result;
+    }
+
+    public String getBook(String isbn) {
+        SQLiteDatabase db = getReadableDatabase();
+
+        final String[] projection = {
+                LibraryDatabaseContract.Books._ID,
+                LibraryDatabaseContract.Books.COLUMN_NAME_TITLE,
+                LibraryDatabaseContract.Books.COLUMN_NAME_AUTHOR,
+                LibraryDatabaseContract.Books.COLUMN_NAME_ISBN,
+                LibraryDatabaseContract.Books.COLUMN_NAME_ISBN13,
+                LibraryDatabaseContract.Books.COLUMN_NAME_PUBLISHER,
+                LibraryDatabaseContract.Books.COLUMN_NAME_PUBLISH_YEAR
+        };
+
+        final String selection = LibraryDatabaseContract.Books.COLUMN_NAME_ISBN + "=?";
+
+        final String[] selectionArgs = { isbn };
+
+        Cursor cursor = db.query(LibraryDatabaseContract.Books.TABLE_NAME,
+                projection,
+                selection,
+                selectionArgs,
+                null,
+                null,
+                null);
+
+        if (cursor.getCount() < 1) { return null; }
+
+        cursor.moveToFirst();
+        String result =
+                "id: " + cursor.getInt(0) + "\n" +
+                        "title: " + cursor.getString(1) + "\n" +
+                        "author: " + cursor.getString(2) + "\n" +
+                        "isbn: " + cursor.getString(3) + "\n" +
+                        "isbn13: " + cursor.getString(4) + "\n" +
+                        "publisher: " + cursor.getString(5) + "\n" +
+                        "publication year: " + cursor.getInt(6);
+
+        db.close();
+        return result;
+    }
+
+    public String getCheckedOut(String name) {
+        SQLiteDatabase db = getReadableDatabase();
+
+        final String query =
+                "SELECT b." + LibraryDatabaseContract.Books.COLUMN_NAME_TITLE +
+                        ", b." + LibraryDatabaseContract.Books.COLUMN_NAME_AUTHOR +
+                        ", b." + LibraryDatabaseContract.Books.COLUMN_NAME_CHECKOUT_MONTH +
+                        ", b." + LibraryDatabaseContract.Books.COLUMN_NAME_CHECKOUT_DAY +
+                        ", b." + LibraryDatabaseContract.Books.COLUMN_NAME_CHECKOUT_YEAR +
+                        ", b." + LibraryDatabaseContract.Books.COLUMN_NAME_DUE_MONTH +
+                        ", b." + LibraryDatabaseContract.Books.COLUMN_NAME_DUE_DAY +
+                        ", b." + LibraryDatabaseContract.Books.COLUMN_NAME_DUE_YEAR +
+                        " FROM " + LibraryDatabaseContract.Members.TABLE_NAME + " m" +
+                        " JOIN " + LibraryDatabaseContract.Books.TABLE_NAME + " b" +
+                        " ON m." + LibraryDatabaseContract.Members._ID + "=b." + LibraryDatabaseContract.Books.COLUMN_NAME_CHECKED_OUT_BY +
+                        " WHERE m." + LibraryDatabaseContract.Members.COLUMN_NAME_NAME + "=?" +
+                        " ORDER BY b." + LibraryDatabaseContract.Books.COLUMN_NAME_DUE_YEAR + " ASC" +
+                        ", b." + LibraryDatabaseContract.Books.COLUMN_NAME_DUE_MONTH + " ASC" +
+                        ", b." + LibraryDatabaseContract.Books.COLUMN_NAME_DUE_DAY + " ASC";
+
+        final String[] selectionArgs = { name };
+
+        Cursor cursor = db.rawQuery(query, selectionArgs);
+
+        StringBuilder sb = new StringBuilder("name: " + name);
+
+        while (cursor.moveToNext()) {
+            sb.append(
+                    "\n-----\n" +
+                            "title: " + cursor.getString(0) + "\n" +
+                            "author: " + cursor.getString(1) + "\n" +
+                            "checkout date: " + cursor.getInt(2) + "/" + cursor.getInt(3) + "/" + cursor.getInt(4) + "\n" +
+                            "due date: " + cursor.getInt(5) + "/" + cursor.getInt(6) + "/" + cursor.getInt(7)
+            );
+        }
+
+        db.close();
+        return sb.toString();
+    }
+
+    public void checkOut(int memberId, int bookId) {
+        SQLiteDatabase db = getWritableDatabase();
+
+        ContentValues values = new ContentValues();
+        values.put(LibraryDatabaseContract.Books.COLUMN_NAME_CHECKED_OUT, 1);
+        values.put(LibraryDatabaseContract.Books.COLUMN_NAME_CHECKED_OUT_BY, memberId);
+
+        Calendar calendar = Calendar.getInstance();
+        values.put(LibraryDatabaseContract.Books.COLUMN_NAME_CHECKOUT_YEAR,  calendar.get(Calendar.YEAR));
+        values.put(LibraryDatabaseContract.Books.COLUMN_NAME_CHECKOUT_MONTH, calendar.get(Calendar.MONTH) + 1);
+        values.put(LibraryDatabaseContract.Books.COLUMN_NAME_CHECKOUT_DAY,   calendar.get(Calendar.DATE));
+
+        calendar.add(Calendar.DATE, 14);
+        values.put(LibraryDatabaseContract.Books.COLUMN_NAME_DUE_YEAR,  calendar.get(Calendar.YEAR));
+        values.put(LibraryDatabaseContract.Books.COLUMN_NAME_DUE_MONTH, calendar.get(Calendar.MONTH) + 1);
+        values.put(LibraryDatabaseContract.Books.COLUMN_NAME_DUE_DAY,   calendar.get(Calendar.DATE));
+
+        final String where = LibraryDatabaseContract.Books._ID + "=?";
+        final String[] whereArgs = { String.valueOf(bookId) };
+
+        db.update(LibraryDatabaseContract.Books.TABLE_NAME, values, where, whereArgs);
+        db.close();
+    }
+
+    public boolean checkIn(int memberId, int bookId) {
+        boolean isLate = checkLate(memberId, bookId);
+
+        SQLiteDatabase db = getWritableDatabase();
+
+        ContentValues values = new ContentValues();
+        values.put(LibraryDatabaseContract.Books.COLUMN_NAME_CHECKED_OUT, 0);
+        values.putNull(LibraryDatabaseContract.Books.COLUMN_NAME_CHECKED_OUT_BY);
+        values.putNull(LibraryDatabaseContract.Books.COLUMN_NAME_CHECKOUT_YEAR);
+        values.putNull(LibraryDatabaseContract.Books.COLUMN_NAME_CHECKOUT_MONTH);
+        values.putNull(LibraryDatabaseContract.Books.COLUMN_NAME_CHECKOUT_DAY);
+        values.putNull(LibraryDatabaseContract.Books.COLUMN_NAME_DUE_YEAR);
+        values.putNull(LibraryDatabaseContract.Books.COLUMN_NAME_DUE_MONTH);
+        values.putNull(LibraryDatabaseContract.Books.COLUMN_NAME_DUE_DAY);
+
+        final String where = LibraryDatabaseContract.Books._ID + "=?";
+        final String[] whereArgs = { String.valueOf(bookId) };
+
+        db.update(LibraryDatabaseContract.Books.TABLE_NAME, values, where, whereArgs);
+        db.close();
+
+        return isLate;
+    }
+
+    private boolean checkLate(int memberId, int bookId) {
+        SQLiteDatabase db = getReadableDatabase();
+
+        final String[] projection = {
+                LibraryDatabaseContract.Books.COLUMN_NAME_DUE_YEAR,
+                LibraryDatabaseContract.Books.COLUMN_NAME_DUE_MONTH,
+                LibraryDatabaseContract.Books.COLUMN_NAME_DUE_DAY
+        };
+
+        final String selection = LibraryDatabaseContract.Books._ID + "=? AND " +
+                LibraryDatabaseContract.Books.COLUMN_NAME_CHECKED_OUT_BY + "=?";
+
+        final String[] selectionArgs = {
+                String.valueOf(bookId),
+                String.valueOf(memberId)
+        };
+
+        Cursor cursor = db.query(LibraryDatabaseContract.Books.TABLE_NAME,
+                projection,
+                selection,
+                selectionArgs,
+                null,
+                null,
+                null);
+
+        if (cursor.getCount() < 1) { return false; }
+
+        cursor.moveToFirst();
+        Calendar dueDate = Calendar.getInstance();
+        dueDate.set(cursor.getInt(0), cursor.getInt(1) - 1, cursor.getInt(2));
+
+        db.close();
+        return dueDate.after(Calendar.getInstance());
+    }
+}
diff --git a/src/main/java/nyc/c4q/ListActivity.java b/src/main/java/nyc/c4q/ListActivity.java
index 08894ac..d4c1c4b 100644
--- a/src/main/java/nyc/c4q/ListActivity.java
+++ b/src/main/java/nyc/c4q/ListActivity.java
@@ -1,45 +1,63 @@
 package nyc.c4q;
 
 import android.app.Activity;
+import android.content.Context;
+import android.content.SharedPreferences;
+import android.graphics.Color;
 import android.os.Bundle;
+import android.view.LayoutInflater;
 import android.view.Menu;
 import android.view.MenuItem;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ArrayAdapter;
+import android.widget.Button;
 import android.widget.ListView;
+import android.widget.TextView;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
 
 
 public class ListActivity extends Activity {
 
+    public final String SHARED_FILE = "shared_file";
     public ListView list;
+    ListAdapter listAdapter;
+    Button buttonName, buttonColor;
+    boolean isColorShown;
+    SharedPreferences preferences;
 
     public static final Person[] PEOPLE = {
-        new Person("Hannah",    "Abbott",          House.Hufflepuff),
-        new Person("Katie",     "Bell",            House.Gryffindor),
-        new Person("Susan",     "Bones",           House.Hufflepuff),
-        new Person("Terry",     "Boot",            House.Ravenclaw),
-        new Person("Lavender",  "Brown",           House.Gryffindor),
-        new Person("Cho",       "Chang",           House.Ravenclaw),
-        new Person("Michael",   "Corner",          House.Ravenclaw),
-        new Person("Colin",     "Creevey",         House.Gryffindor),
-        new Person("Marietta",  "Edgecombe",       House.Ravenclaw),
-        new Person("Justin",    "Finch-Fletchley", House.Hufflepuff),
-        new Person("Seamus",    "Finnigan",        House.Gryffindor),
-        new Person("Anthony",   "Goldstein",       House.Ravenclaw),
-        new Person("Hermione",  "Granger",         House.Gryffindor),
-        new Person("Angelina",  "Johnson",         House.Gryffindor),
-        new Person("Lee",       "Jordan",          House.Gryffindor),
-        new Person("Neville",   "Longbottom",      House.Gryffindor),
-        new Person("Luna",      "Lovegood",        House.Ravenclaw),
-        new Person("Ernie",     "Macmillan",       House.Hufflepuff),
-        new Person("Parvati",   "Patil",           House.Gryffindor),
-        new Person("Padma",     "Patil",           House.Ravenclaw),
-        new Person("Harry",     "Potter",          House.Gryffindor),
-        new Person("Zacharias", "Smith",           House.Hufflepuff),
-        new Person("Alicia",    "Spinnet",         House.Gryffindor),
-        new Person("Dean",      "Thomas",          House.Gryffindor),
-        new Person("Fred",      "Weasley",         House.Gryffindor),
-        new Person("George",    "Weasley",         House.Gryffindor),
-        new Person("Ginny",     "Weasley",         House.Gryffindor),
-        new Person("Ron",       "Weasley",         House.Gryffindor)
+            new Person("Hannah", "Abbott", House.Hufflepuff),
+            new Person("Katie", "Bell", House.Gryffindor),
+            new Person("Susan", "Bones", House.Hufflepuff),
+            new Person("Terry", "Boot", House.Ravenclaw),
+            new Person("Lavender", "Brown", House.Gryffindor),
+            new Person("Cho", "Chang", House.Ravenclaw),
+            new Person("Michael", "Corner", House.Ravenclaw),
+            new Person("Colin", "Creevey", House.Gryffindor),
+            new Person("Marietta", "Edgecombe", House.Ravenclaw),
+            new Person("Justin", "Finch-Fletchley", House.Hufflepuff),
+            new Person("Seamus", "Finnigan", House.Gryffindor),
+            new Person("Anthony", "Goldstein", House.Ravenclaw),
+            new Person("Hermione", "Granger", House.Gryffindor),
+            new Person("Angelina", "Johnson", House.Gryffindor),
+            new Person("Lee", "Jordan", House.Gryffindor),
+            new Person("Neville", "Longbottom", House.Gryffindor),
+            new Person("Luna", "Lovegood", House.Ravenclaw),
+            new Person("Ernie", "Macmillan", House.Hufflepuff),
+            new Person("Parvati", "Patil", House.Gryffindor),
+            new Person("Padma", "Patil", House.Ravenclaw),
+            new Person("Harry", "Potter", House.Gryffindor),
+            new Person("Zacharias", "Smith", House.Hufflepuff),
+            new Person("Alicia", "Spinnet", House.Gryffindor),
+            new Person("Dean", "Thomas", House.Gryffindor),
+            new Person("Fred", "Weasley", House.Gryffindor),
+            new Person("George", "Weasley", House.Gryffindor),
+            new Person("Ginny", "Weasley", House.Gryffindor),
+            new Person("Ron", "Weasley", House.Gryffindor)
     };
 
     @Override
@@ -47,7 +65,129 @@ protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.activity_list);
 
+            preferences = this.getSharedPreferences(SHARED_FILE, Context.MODE_PRIVATE);
+            isColorShown = preferences.getBoolean("color", false);
+
         list = (ListView) findViewById(R.id.list);
+        listAdapter = new ListAdapter(getApplicationContext(), R.layout.listitem_member, PEOPLE, isColorShown);
+        list.setAdapter(listAdapter);
+
+
+        buttonName = (Button) findViewById(R.id.button_name);
+        buttonName.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                if (buttonName.getText().toString().equals("Last, First")) {
+                    buttonName.setText("First Last");
+                    listAdapter.setFirstnameFirst(true);
+                    listAdapter.notifyDataSetChanged();
+                    list.setAdapter(listAdapter);
+                } else if (buttonName.getText().toString().equals("First Last")) {
+                    buttonName.setText("Last, First");
+                    listAdapter.setFirstnameFirst(false);
+                    listAdapter.notifyDataSetChanged();
+                    list.setAdapter(listAdapter);
+                }
+            }
+        });
+
+
+        buttonColor = (Button) findViewById(R.id.button_color);
+        buttonColor.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                if (buttonColor.getText().toString().equals("Show Color")) {
+                    buttonColor.setText("Hide Color");
+                    listAdapter.setColorShown(false);
+                    SharedPreferences.Editor editor = preferences.edit();
+                    editor.putBoolean("color", false);
+                    // .commit() runs in the foreground so when onDestroy() is called on quitting the app, the info will be safely written to SharedPrefs before the app is destroyed
+                    editor.commit();
+                    // refreshes the view of the listview
+                    listAdapter.notifyDataSetChanged();
+                } else if (buttonColor.getText().toString().equals("Hide Color")) {
+                    buttonColor.setText("Show Color");
+                    listAdapter.setColorShown(true);
+                    SharedPreferences.Editor editor = preferences.edit();
+                    editor.putBoolean("color", true);
+                    editor.commit();
+                    listAdapter.notifyDataSetChanged();
+                }
+            }
+        });
+
+
+    }
+
+    public class ListAdapter extends ArrayAdapter<Person> {
+
+        TextView house, name;
+        boolean firstNameFirst;
+        boolean isColorShown;
+
+
+        public ListAdapter(Context context, int resource, Person[] objects, boolean isColorShown) {
+            super(context, resource, objects);
+            this.isColorShown = isColorShown;
+
+        }
+
+        public void setColorShown(boolean isColorShown) {
+            this.isColorShown = isColorShown;
+        }
+
+
+        public void setFirstnameFirst(boolean enabled) {
+            firstNameFirst = enabled;
+
+            if (enabled) {
+                Arrays.sort(PEOPLE, new FirstNameComparator());
+            } else {
+                Arrays.sort(PEOPLE, new LastNameComparator());
+            }
+        }
+
+        @Override
+        public View getView(int position, View v, ViewGroup parent) {
+
+            Person person = getItem(position);
+
+            if (v == null) {
+                LayoutInflater vi;
+                vi = LayoutInflater.from(getContext());
+                v = vi.inflate(R.layout.listitem_member, null);
+            }
+
+            house = (TextView) v.findViewById(R.id.text_house);
+            name = (TextView) v.findViewById(R.id.text_name);
+
+            house.setText(person.getHouse().toString());
+
+
+            if (buttonName.getText().toString().equals("Last, First")) {
+                name.setText(person.getLastName() + ", " + person.getFirstName());
+            } else if (buttonName.getText().toString().equals("First Last")) {
+                name.setText(person.getFirstName() + " " + person.getLastName());
+            }
+
+            if (isColorShown) {
+                v.setBackgroundColor(Color.BLACK);
+            } else {
+                if (house.getText().equals("Gryffindor")) {
+                    v.setBackgroundResource(R.color.gryffindor_red);
+                } else if (house.getText().equals("Ravenclaw")) {
+                    v.setBackgroundResource(R.color.ravenclaw_blue);
+                } else if (house.getText().equals("Slytherin")) {
+                    v.setBackgroundResource(R.color.slytherin_green);
+                } else if (house.getText().equals("Hufflepuff")) {
+                    v.setBackgroundResource(R.color.hufflepuff_yellow);
+                }
+            }
+
+
+            return v;
+        }
     }
 
 }
+
diff --git a/src/main/java/nyc/c4q/Member.java b/src/main/java/nyc/c4q/Member.java
new file mode 100644
index 0000000..3a694aa
--- /dev/null
+++ b/src/main/java/nyc/c4q/Member.java
@@ -0,0 +1,189 @@
+package nyc.c4q;
+
+import com.google.gson.annotations.SerializedName;
+import com.j256.ormlite.field.DatabaseField;
+import com.j256.ormlite.table.DatabaseTable;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Created by Hoshiko on 8/30/15.
+ */
+
+// CREATED USING JSONSCHEMA2POJO.ORG -- COPY & PASTE FROM JSON TO CONVERT GSON; SELECT "NONE"
+
+@DatabaseTable(tableName = "members")
+public class Member {
+    @DatabaseField
+    private Integer id;
+
+    @DatabaseField
+    private String name;
+
+    // "@SeralizedName" is used when the java object isn't named the same as in the JSON
+    @SerializedName("dob_month")
+    @DatabaseField
+    private Integer dobMonth;
+
+    @SerializedName("dob_day")
+    @DatabaseField
+    private Integer dobDay;
+
+    @SerializedName("dob_year")
+    @DatabaseField
+    private Integer dobYear;
+
+    @DatabaseField
+    private String city;
+
+    @DatabaseField
+    private String state;
+    private Map<String, Object> additionalProperties = new HashMap<String, Object>();
+
+    Member (){}
+
+    public Member(int id, String name, int dobMonth, int dobDay, int dobYear, String city, String state) {
+        this.id = id;
+        this.name = name;
+        this.dobMonth = dobMonth;
+        this.dobDay = dobDay;
+        this.dobYear = dobYear;
+        this.city = city;
+        this.state = state;
+    }
+
+    /**
+     *
+     * @return
+     *     The id
+     */
+    public Integer getId() {
+        return id;
+    }
+
+    /**
+     *
+     * @param id
+     *     The id
+     */
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    /**
+     *
+     * @return
+     *     The name
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     *
+     * @param name
+     *     The name
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     *
+     * @return
+     *     The dobMonth
+     */
+    public Integer getDobMonth() {
+        return dobMonth;
+    }
+
+    /**
+     *
+     * @param dobMonth
+     *     The dob_month
+     */
+    public void setDobMonth(Integer dobMonth) {
+        this.dobMonth = dobMonth;
+    }
+
+    /**
+     *
+     * @return
+     *     The dobDay
+     */
+    public Integer getDobDay() {
+        return dobDay;
+    }
+
+    /**
+     *
+     * @param dobDay
+     *     The dob_day
+     */
+    public void setDobDay(Integer dobDay) {
+        this.dobDay = dobDay;
+    }
+
+    /**
+     *
+     * @return
+     *     The dobYear
+     */
+    public Integer getDobYear() {
+        return dobYear;
+    }
+
+    /**
+     *
+     * @param dobYear
+     *     The dob_year
+     */
+    public void setDobYear(Integer dobYear) {
+        this.dobYear = dobYear;
+    }
+
+    /**
+     *
+     * @return
+     *     The city
+     */
+    public String getCity() {
+        return city;
+    }
+
+    /**
+     *
+     * @param city
+     *     The city
+     */
+    public void setCity(String city) {
+        this.city = city;
+    }
+
+    /**
+     *
+     * @return
+     *     The state
+     */
+    public String getState() {
+        return state;
+    }
+
+    /**
+     *
+     * @param state
+     *     The state
+     */
+    public void setState(String state) {
+        this.state = state;
+    }
+
+    public Map<String, Object> getAdditionalProperties() {
+        return this.additionalProperties;
+    }
+
+    public void setAdditionalProperty(String name, Object value) {
+        this.additionalProperties.put(name, value);
+    }
+}
diff --git a/src/main/java/nyc/c4q/MySQLiteOpenHelper.java b/src/main/java/nyc/c4q/MySQLiteOpenHelper.java
new file mode 100644
index 0000000..13fc453
--- /dev/null
+++ b/src/main/java/nyc/c4q/MySQLiteOpenHelper.java
@@ -0,0 +1,181 @@
+package nyc.c4q;
+
+import android.content.Context;
+import android.database.SQLException;
+import android.database.sqlite.SQLiteDatabase;
+import android.util.Log;
+
+import com.j256.ormlite.android.apptools.OrmLiteSqliteOpenHelper;
+import com.j256.ormlite.dao.Dao;
+import com.j256.ormlite.dao.RuntimeExceptionDao;
+import com.j256.ormlite.support.ConnectionSource;
+import com.j256.ormlite.table.TableUtils;
+
+import java.util.List;
+
+
+
+
+/**
+ * Created by Hoshiko on 8/30/15.
+ */
+public class MySQLiteOpenHelper extends OrmLiteSqliteOpenHelper {
+
+    // TODO: Once JSON data from raw file is converted into ArrayList of Book/Member objects, create methods USING JSONHELPER.lass to interact objects with SQLite Database
+
+    public static final String DATABASE_NAME = "mydb.db";
+    public static final int DATABASE_VERSION = 2;
+
+    private static MySQLiteOpenHelper mHelper;
+
+    // PRIMARY KEY "INTEGER"
+    private Dao<Member, Integer> memberDao = null;
+    private Dao<Book, Integer> bookDao = null;
+
+    private RuntimeExceptionDao<Member, Integer> simpleRuntimeDao = null;
+    private RuntimeExceptionDao<Book, Integer> simpleRuntimeDao2 = null;
+
+    public MySQLiteOpenHelper(Context context) {
+        super(context, DATABASE_NAME, null, DATABASE_VERSION);
+    }
+
+    public static synchronized MySQLiteOpenHelper getInstance(Context context) {
+        if (mHelper == null) {
+            mHelper = new MySQLiteOpenHelper(context.getApplicationContext());
+        }
+
+        return mHelper;
+    }
+
+    /**
+     * This is called when the database is first created. Usually you should call createTable statements here to create
+     * the tables that will store your data.
+     */
+    @Override
+    public void onCreate(SQLiteDatabase database, ConnectionSource connectionSource) {
+        try {
+            TableUtils.createTable(connectionSource, Book.class);
+            TableUtils.createTable(connectionSource, Member.class);
+        } catch (SQLException e) {
+            Log.e(MySQLiteOpenHelper.class.getName(), "Can't create database", e);
+            throw new RuntimeException(e);
+        } catch (java.sql.SQLException e) {
+            e.printStackTrace();
+        }
+
+    }
+
+  // onUpgrade only updates the TABLE columns (not the entries)
+    @Override
+    public void onUpgrade(SQLiteDatabase db,ConnectionSource connectionSource, int oldVersion, int newVersion) {
+
+        try {
+            TableUtils.dropTable(connectionSource, Member.class, false);
+            TableUtils.dropTable(connectionSource, Book.class, false);
+
+        }catch (java.sql.SQLException e) {
+            e.printStackTrace();
+        }
+        onCreate(db, connectionSource);
+
+    }
+
+    public Dao<Member, Integer> getMembeDao() {
+        if (null == memberDao) {
+            try {
+                memberDao = getDao(Member.class);
+            }catch (java.sql.SQLException e) {
+                e.printStackTrace();
+            }
+        }
+        return memberDao;
+    }
+
+
+    public void insertMemberData(int id, String name, int dobMonth, int dobDay, int dobYear, String city, String state) throws SQLException {
+
+        Member member = new Member(id, name, dobMonth, dobDay, dobYear, city, state);
+        Dao<Member, Integer> dao = null;
+        try {
+            dao = getDao(Member.class);
+            dao.create(member);
+        } catch (java.sql.SQLException e) {
+            e.printStackTrace();
+        }
+
+    }
+
+
+    public Member loadMemberData(String name) throws SQLException, java.sql.SQLException {
+        // queryForFirst() will return just ONE result object
+        return getDao(Member.class).queryBuilder().where().eq("name", name).queryForFirst();
+    }
+
+    public List <Member> loadAllMember () throws java.sql.SQLException {
+        // no where statement because getting ALL objects from row
+        return getDao(Member.class).queryForAll();
+    }
+
+    public Dao<Book, Integer> getBookDao() {
+        if (null == bookDao) {
+            try {
+                bookDao = getDao(Book.class);
+            }catch (java.sql.SQLException e) {
+                e.printStackTrace();
+            }
+        }
+        return bookDao;
+    }
+
+    public void insertBookData(int id, String title, String author, String isbn,
+                               String isbn13, String publisher, int publishyear) throws SQLException {
+
+        Book book = new Book(id, title, author, isbn, isbn13, publisher, publishyear);
+        Dao<Book, Integer> dao = null;
+        try {
+            dao = getDao(Book.class);
+            dao.create(book);
+        } catch (java.sql.SQLException e) {
+            e.printStackTrace();
+        }
+
+    }
+
+    public void insertBookCheckedOutData(int id, String title, String author, String isbn,
+                                         String isbn13, String publisher, int publishyear,
+                                         Boolean checkedout, int checkedoutby, int checkoutdateyear,
+                                         int checkoutdatemonth, int checkoutdateday, int duedateyear,
+                                         int duedatemonth, int duedateday) throws SQLException {
+
+        Book book = new Book(id, title, author, isbn, isbn13, publisher, publishyear, checkedout,
+                checkedoutby, checkoutdateyear, checkoutdatemonth, checkoutdateday, duedateyear, duedatemonth, duedateday);
+        Dao<Book, Integer> dao = null;
+        try {
+            dao = getDao(Book.class);
+            dao.create(book);
+        } catch (java.sql.SQLException e) {
+            e.printStackTrace();
+        }
+
+    }
+
+
+
+    public Book loadBookData(String isbn) throws SQLException, java.sql.SQLException {
+        return getDao(Book.class).queryBuilder().where().eq("isbn", isbn).queryForFirst();
+    }
+
+    public List <Book> loadAllBook () throws java.sql.SQLException {
+        return getDao(Book.class).queryForAll();
+    }
+
+    public List <Book> loadCheckedOutBooks (String name) throws java.sql.SQLException {
+        Member member = getDao(Member.class).queryBuilder().where().eq("name", name).queryForFirst();
+        // once member object is accessed, go into row entry and retrieve member ID to access checked out books
+        int memberId = member.getId();
+
+        // .query() because not sure if the member borrowed more than 1 book
+        return getDao(Book.class).queryBuilder().where().eq("checkedout", true).and().eq("checkedoutby", memberId).query();
+    }
+
+}
\ No newline at end of file
diff --git a/src/main/java/nyc/c4q/PaceCalculatorActivity.java b/src/main/java/nyc/c4q/PaceCalculatorActivity.java
index 5c0616e..12ef6f3 100644
--- a/src/main/java/nyc/c4q/PaceCalculatorActivity.java
+++ b/src/main/java/nyc/c4q/PaceCalculatorActivity.java
@@ -1,14 +1,33 @@
 package nyc.c4q;
 
+import android.support.v4.app.Fragment;
 import android.support.v4.app.FragmentActivity;
 import android.os.Bundle;
+import android.widget.Button;
+import android.widget.EditText;
+import android.widget.FrameLayout;
+import android.widget.LinearLayout;
 
 public class PaceCalculatorActivity extends FragmentActivity {
 
+    FrameLayout frameLayout;
+    LinearLayout linearLayout;
+
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.activity_pace_calculator);
+
+        Fragment fragment = new Fragment_pace_calc();
+
+        frameLayout = (FrameLayout) findViewById(R.id.activity_pace_calculator);
+        linearLayout = (LinearLayout) findViewById(R.id.linear_layout);
+
+
+        android.support.v4.app.FragmentManager fragmentManager = getSupportFragmentManager();
+        fragmentManager.beginTransaction().replace(R.id.linear_layout, fragment).commit();
+
+
     }
 
 }
diff --git a/src/main/java/nyc/c4q/Person.java b/src/main/java/nyc/c4q/Person.java
index 2f2f167..f29d842 100644
--- a/src/main/java/nyc/c4q/Person.java
+++ b/src/main/java/nyc/c4q/Person.java
@@ -10,4 +10,16 @@ public Person(String firstName, String lastName, House house) {
         this.lastName  = lastName;
         this.house     = house;
     }
+
+    public String getFirstName() {
+        return firstName;
+    }
+
+    public String getLastName() {
+        return lastName;
+    }
+
+    public House getHouse() {
+        return house;
+    }
 }
diff --git a/src/main/res/layout/activity_pace_calculator.xml b/src/main/res/layout/activity_pace_calculator.xml
index ed76b3e..72b06d2 100644
--- a/src/main/res/layout/activity_pace_calculator.xml
+++ b/src/main/res/layout/activity_pace_calculator.xml
@@ -5,4 +5,15 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     tools:context="nyc.c4q.PaceCalculatorActivity"
-    />
+    >
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:id="@+id/linear_layout"
+        android:orientation="vertical"/>
+
+
+</FrameLayout>
+
+
diff --git a/src/main/res/raw/books.json b/src/main/res/raw/books.json
index 8cc9673..79b378e 100644
--- a/src/main/res/raw/books.json
+++ b/src/main/res/raw/books.json
@@ -838,7 +838,7 @@
         "isbn": "0439554934",
         "isbn13": "9780439554930",
         "publisher": "Scholastic",
-        "publishyear": 2003.
+        "publishyear": 2003,
         "checkedout": true,
         "checkedoutby": 38,
         "checkoutdateyear": 2015,