Updated to work with dark variables