implement config function