added magical secure stuff