CODE for final project