Layout and logic changed a bit