Added tests, made them pass