moved setup to X_setup