added Previous button and transition