program 2
full program 2 functionality