make overlay conditional