added intgegration and functional tests