testing function code problems