Add comments on logic