finished implementing scene 3
fixed var declarations and added forgotten flag sets