fixed order of includes. still having trouble with undefined references