added registry stuff