added end of act function and setup for changing between acts