More efficient project function