     end
   end
 
+  def new_account(account) do
+    Schema.create_changeset(account)
+    |> do_new_account()
+  end
+
   defp do_new_account(changeset) do
     case Repo.insert(changeset) do
       {:ok, result} ->

        {:error, Error.format_reply(:unspecified, "oh god")}
    end
  end
end

    end
  end

  def find(email) do
    case Repo.get_by(Account, email: email) do
      nil -> {:reply, {:error, Error.format_reply(:not_found, "Account with given email not found")}}
      res -> {:reply, {:ok, res}}
    end
  end

