cleaned up bypass code a bit