I am not sure why this program is hanging.