replace double to double_t and add license