added auto-enable functionality