updated for C11