added testfunctions.R