Added code to second view controller