project 4 functionality implemented