Final version ( hopefully) of gen alg part 1

Signed-off-by: victor <victor@victor-VirtualBox.(none)>