Fix #3

Added tests