changed route for detecting mode and size