adding code. compiles, but stalls when run. don't know why
updates