Filled in the rest of secondview functionality