Finished coding for v2.0