Getting program to work