updated prepare script