script edited for redirecting page