added lifecycle methods to Project3.java