Updated with pictures and a bit new logic