modified for proj2