main js code project 4