working genetic logic