removed mallocs