test made more functional