disgusting logic commented out