Adding in logic