functional proj 3 with bonus