working on automatic redirecting