added another algo
fixed layout a bit