improve codes