ensure that user doesn't access code through an unwanted path