implement tests to prevent bug #1 to apppear again