better slotting algorithm, added dock widget