changing script logic