everything static, removed all mallocs