fix #2: Implement tests