Removed crazy switch in favor of math based approach