working on the double gates, fixed the selection