added slots, now program works