tests functions