rolled back to gnu99 as c11 features were left unused