Started re-writing program to adhere to new protocol