added test function to resouce